package scenic;

import org.junit.Test;

/**
 * Created by scenic on 2017/3/10.
 */

public class TesTtrigonometric {

    @Test
    public void testSin() {
        for (int i = 0; i < 480; i++) {
            double d1 = Math.sin(i);
            double d2 = Math.sin(Math.PI - i);
            boolean result = d1 - d2 < 0.000000001;
            if(!result){
                System.out.println( "Error");
            }

        }
    }


    @Test
    public void testCos() {
        for (int i = 0; i < 480; i++) {
            double d1 = Math.cos(i);
            double d2 = Math.cos(2 * Math.PI - i);
            boolean result = d1 - d2 < 0.000000001;
            if(!result){
                System.out.println( "Error");
            }

        }
    }

    @Test
    public void test(){
        //­0.25881904510252035 0 ­0.9659258262890686

        double value1 = -0.965925826289069;

        System.out.println(Math.asin(value1) * 180 / Math.PI);


    }

}
